package com.pet.system;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pet.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
@ApiModel(description = "订单表")
@TableName("sys_order")
public class SysOrder extends BaseEntity {


    private static final long serialVersionUID = 1L;

    /**
     * 会诊ID
     */
    @ApiModelProperty(value = "会诊ID")
    @TableField("consultation_id")
    private String consultationId;

    @TableField("id")
    private Long id;

    /**
     * 金额
     */
    @ApiModelProperty(value = "会诊id")
    @TableField("amount")
    private Integer amount;

    /**
     * 用户id，关联用户表
     */
    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    /**
     * 医生执业编号
     */
    @ApiModelProperty(value = "医生执业编号")
    @TableField("license_number")
    private String licenseNumber;

    /**
     * 宠物id
     */
    @ApiModelProperty(value = "宠物id")
    @TableField("p_id")
    private Long pId;

    /**
     * 病症描述id
     */
    @ApiModelProperty(value = "病症描述id")
    @TableField("s_id")
    private Integer sId;

    private Long status;//订单状态

    @TableField(exist = false)
    private SysPet sysPet;//宠物

    @TableField(exist = false)
    private Symptom symptom;//症状

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableLogic  //逻辑删除 默认效果 0 没有删除 1 已经删除
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private Map<String,Object> param = new HashMap<>();
}
